updating oE maybe_any_key

maybe_any_key

include console.e 
namespace console 
public procedure maybe_any_key(sequence prompt = "Press Any Key to continue...", 
        integer con = 1) 

displays a prompt to the user and waits for any key. Only if the user is running under a GUI environment.

Parameters:
  1. prompt : Prompt to display, defaults to "Press Any Key to continue..."
  2. con : Either 1 (stdout), or 2 (stderr). Defaults to 1.
Comments:

This wraps wait_key by giving a clue that the user should press a key, and perhaps do some other things as well.

Requires Windows XP or later or Windows 2003 or later to work. Earlier versions of Windows or O/S will always pause even when not needed.

On Unix systems this will not pause even when needed.

Example 1:
any_key() -- "Press Any Key to continue..." 
Example 2:
any_key("Press Any Key to quit") 
See Also:

wait_key

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu